package com.yifushidai.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import javax.persistence.*;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_dynamic_tempkey")
public class DynamicTempkey {
    /**
     * 自动编号
     */
    @Id
    private Integer id;

    /**
     * 联网盒mac
     */
    private String mac;

    /**
     * 推送索引
     */
    @Column(name = "push_index")
    private Integer pushIndex;

    /**
     * 临时密码
     */
    @Column(name = "temp_key")
    private String tempKey;

    /**
     * 推送时间
     */
    @Column(name = "push_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date pushDate;

    /**
     * 失效时间
     */
    @Column(name = "expire_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireDate;
}